package com.sixteen.theGreat.workbench.mapper;

import com.sixteen.theGreat.workbench.entity.Talk;

import java.util.List;

public interface TalkMapper {
    /**
     * 添加说说
     * @param talk
     * @return
     */
    int insertTalk(Talk talk);

    /**
     * 根据userId这个外键,查询说说
     * @param userId
     * @return
     */
    List<Talk> selectTalkByUserId(String userId);

    /**
     * 删除我的说说
     * @param talkId
     * @return
     */
    int deleteTalk(String[] talkId);

    /**
     * 根据hostId查询好友说说
     * @param userId
     * @return
     */
    List<Talk> selectFriendTalkByHostId(String userId);

    /**
     * 根据userId查询我的说说以及 我的好友的说说
     * @param userId
     * @return
     */
    List<Talk> selectAllTalkByUserId(String userId);
}
